home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / texts / zcd.lha / Listino / Announces / Graffiti.txt < prev    next >
Text File  |  1996-02-22  |  18KB  |  479 lines

  1. Reply auf User fer@inrete.it am 04.01.1996 21:59:16
  2.  
  3. >Dear Sir,
  4. >
  5. >One my customer has told me about your gfx card for A1200.
  6. >Please give me every information about it, I could be interest
  7. >to distribute it in Italy.
  8. >
  9. In fact, the card is not only for the A1200, but for all Amigas. As I heard
  10. on the developer conference in Köln, Germany in November, most Italians
  11. have the A500, so you'll be pleased to hear that it works fine with ist. At
  12. the end of this message I'll send you the "short-data" and the
  13. developer-manual.
  14.  
  15. Just a word for the developer manual: I decided not to make a "lores" and a
  16. "Hires" version, there is only one version that can display every
  17. resolution.
  18.  
  19. --
  20. Jens Schönfeld
  21.  
  22. --- cut here (short info, for advertising) ---
  23. Some technical information about the Graffiti card...
  24.  
  25.  
  26. - works with _any_ Amiga:
  27.   A500/1200/2000/2500/3000/3000T/4000/4000T
  28.   Even A 1000, CDTV, SX-32, SX-1 and A600/A500 plus have been successfully
  29.   tested!
  30.  
  31. - 256 out of 262144 colours at a time
  32.  
  33. - lores Output on OCS/ECS Amigas, Hires on AA Amigas. Overscan and
  34.   interlace supported!
  35.  
  36. - simply plugs to the RGB-port of the Amiga. No need to open
  37.   the Computer! (RGB 15Khz Monitor required).
  38.   If not activated, standard Amiga Graphics is displayed.
  39.  
  40. - chunky graphics for fast animation sequences/ texture mapping games
  41.   Chunky means: one byte in memory represents one pixel on screen.
  42.  
  43. - programmers only have to switch on 4 bitplanes => 4 DMA channels
  44.   => full 7MB/sec on AA Amigas!
  45.   (compared to 3.5 to 5 MB/s on 8bpls lores!)
  46.  
  47. - faster display by reducing the resolution:
  48.   The Graffiti supports half and quarter-lores (160 an 80 pixels/line)
  49.   without additional CPU or blitter time for expanding the pixels!
  50.  
  51. - uses chipmem to store graphics, no memory on the card (that's why it's
  52.   this cheap!)
  53.  
  54. - sales price 149 DM (about 700 DKK, 105 US$)
  55.  
  56. - software:
  57.  
  58.   + external video driver for shapeshifter shipped with the card
  59.   + IFF/GIF/JPEG viewers
  60.   + AVI Video player
  61.   + doom-style games
  62.   + Graffiti support CD released every 3 to 6 months:
  63.     only DM 9,95 (40 DKK, 7 US$)
  64.  
  65. - for the developer Manual call Nostalgic BBS +49 241 86985
  66.   Login: Graffiti, Password: Graffiti
  67.   (sorry, BBS Language is German!)
  68.  
  69.  
  70. ------------ cut again (short info) -----------
  71.  
  72. ------- cut (developer manual) ------
  73.             Earth, Germany, Aachen, September '95
  74.  
  75. Documentation for the Graffiti Gfx card for OCS/ECS/AGA Amigas
  76.  
  77. "Someone said, that programmers can't make readable manuals.
  78. Here's one from a hardware designer, so don't wonder if it's
  79. a complete disaster".
  80.  
  81. 1. What it does
  82.  
  83. Graffiti  changes the Amiga bitplaned graphics into a chunky
  84. pixel  mode.   I.e.   one byte in memory represents a single
  85. pixel.    The value of a byte selects it's colour.  The colour
  86. palette   is   256  out  of  262144  at  a  time.   Possible
  87. resolutions  are  640x256  (hires  version  only),  320x256,
  88. 160x256   and    80x256.   In  each  mode,  256    colours  are
  89. available, interlacing doubles the vertical resolution.
  90.  
  91. 2. How to connect
  92.  
  93. The Graffiti card plugs into the RGB port of the Amiga.  The
  94. monitor must be connected to the RGB output of the Graffiti,
  95. there's  no  need  to open the computer.  See appendix A for
  96. Dip switch settings.
  97.  
  98. 3. System requirements, compatibility, limits
  99.  
  100. The  hardware  has  been  successfully tested with all known
  101. Amiga models:  A500, A600, A1200, A2000, A2500, A3000, Amiga
  102. CDTV  and  the    A4000.     Even  "the" Amiga (later called the
  103. Amiga  1000)  has  been sucsessfully tested.  For displaying
  104. the  output, a standard 15khz RGB-Monitor like the commodore
  105. 1081  and  1084  models is required.  The commodore A2024 is
  106. not supported.    The Graffiti is PAL and NTSC compatible.
  107.  
  108. For  full  speed  advantages,  AGA  Chipset or the A3000 are
  109. recommended.    For   more  speed,  accelerator  cards    with
  110. burstmode fastmem are recommended.
  111.  
  112. Due  to  the  limited bandwidth of the chipmemory, the frame
  113. rate  of  a  motion  sequence is limited.  At about 7MB/s on
  114. AGA-chipsets  using 4 Bpls hires, with longword-access about
  115. 74  frames/s can be transferred - more than required.  Using
  116. word  access,  it's  reduced  to about 37 frames/s, and with
  117. byte  access  only  18    frames/s are possible, so setting up
  118. longwords  in  the  processor  registers  or  in  fastmem is
  119. recommended.   (Numbers  assuming  a 384x256 window).  Using
  120. the  160x256  pixel  mode of the hires version or the 80x256
  121. pixel  mode,  the chunky buffer is completely linear, so you
  122. can access four pixels in a row with a single longword move.
  123.  
  124. Colour    #0  of    the  Graffiti (external palette, see further
  125. down) must always be set to black (R=G=B=0), because of some
  126. monitors  trying  to  adapt to a 0- level after Hsync.    This
  127. causes    vertical  brightness  fading  in  the first lines if
  128. colour#0  is  not set to black.  It's different on different
  129. monitors, so this cannot be used as an effect.
  130.  
  131. 4. Activating the card, word definitions
  132.  
  133. Lores version:
  134. To  activate the card, switch to a hires screen at 1, 2 or 4
  135. bitplanes,  depending on the resolution you want to display.
  136. Set the genlock audio bit to 1, otherwise the standard Amiga
  137. bitplaned graphics will be displayed.
  138.  
  139. Hires version:
  140. To  activate the card, switch to a hires or SHires screen at
  141. 1, 2 or 4 bitplanes, depending on the resolution you want to
  142. display.   Set    the  genlock  audio  bit to 1, otherwise the
  143. standard Amiga bitplaned graphics will be displayed.
  144.  
  145. The  Graffiti  card  has  got it's own color palette that is
  146. called    "external  palette"  from now on.  The Amiga-palette
  147. that   is  set    in  denise/lisa  will  be  called  "internal
  148. palette".
  149.  
  150. While displaying the chunky pixel mode, the internal palette
  151. must  be  set  to  one    of  the  following:  (no matter what
  152. version you are programming)
  153.  
  154. 4 bitplanes:  (320 pixel/line at hires, 640 pixel/line at SHires)
  155.            R   G   B
  156. Colour #0      0   0   0
  157. Colour #1      0   0   1
  158. Colour #2      0   0   8
  159. Colour #3      0   0   9
  160. Colour #4      0   8   0
  161. Colour #5      0   8   1
  162. Colour #6      0   8   8
  163. Colour #7      0   8   9
  164. Colour #8      8   0   0
  165. Colour #9      8   0   1
  166. Colour #10     8   0   8
  167. Colour #11     8   0   9
  168. Colour #12     8   8   0
  169. Colour #13     8   8   1
  170. Colour #14     8   8   8
  171. Colour #15     8   8   9
  172.  
  173. 2 bitplanes:  (160 pixel/line at hires, 320 pixel/line at SHires)
  174.            R   G   B
  175. Colour #0      0   0   0
  176. Colour #1      0   0   9
  177. Colour #2      8   8   0
  178. Colour #3      8   8   9
  179.  
  180. 1 bitplane:   (80 pixel/line at hires, 160 pixel/line at SHires)
  181.            R   G   B
  182. Colour #0      0   0   0
  183. Colour #1      8   8   9
  184.  
  185. The  See  appendix  A  for  softscroll-values and Dip-Switch
  186. settings.
  187.  
  188. While  displaying  a chunky pixel mode, the internal palette
  189. and  the  X-  Offset  of  the bitplanes must not be changed,
  190. otherwise  the    Graffiti does undefined things (don't worry,
  191. it won't toast your hamster).
  192.  
  193. Choosing  4  bitplanes    hires or 2 bitplanes SHires sets the
  194. Graffiti  to 320x256 pixel.  Setting up 2 bitplanes hires or
  195. 1  Bitplane  SHires  selects  160x256  pixel,  and  a single
  196. bitplane   hires  selects  the    80x256    mode.    The  highest
  197. resolution  available  is 4 Bitplanes SHires, resulting in a
  198. display    of     640x256    pixel.     The    Graffiti      is
  199. overscan-compatible,  so  up  to 768 pixel and more than 512
  200. lines are possible (depends on PAL or NTSC modes, interlaced
  201. or non-interlaced).
  202.  
  203. 5. Initializing the card
  204.  
  205. After power-up the RamDAC chip on the Graffiti card is in an
  206. undefined  state.   It    must be initialized by a sequence of
  207. commands  sent    in  the  Graphics  data.   After a VSync the
  208. Graffiti  card is in command mode, meaning the bitplane data
  209. is  interpreted  as  commands,    not as Gfx data.  In command
  210. mode, the Graffiti shows a black screen, so transferring the
  211. palette   is   invisible  for  the  user.   Note  that    when
  212. interlacing,  a  VBlank  splits the two half screens, so you
  213. have to send start-Graphic commands every half frame.
  214.  
  215. Commands  can only be sent within 4 Bitplanes Hires with the
  216. corrosponding internal palette set.
  217.  
  218. A command is composed of two bytes, the command byte and the
  219. parameter byte.  There are 6 commands:
  220.  
  221. 0   NOP          No operation, parameter is ignored.
  222.  
  223. 4   Set colour         Parameter sets colour to be set
  224.              next.
  225.  
  226. 5   Set Mask register     Parameter sets the pixel read mask
  227.              register (should be set to #255)
  228.  
  229. 6   Set RGB value     sets the RGB values of the colour
  230.              that is defined by the 4-command.
  231.              This command must be executed three
  232.              times in a row, first to set the
  233.              Red value, then to set the green
  234.              value, then to set the blue value.
  235.              Values must be from 0 to 63, the
  236.              upper two bits are ignored.
  237.  
  238. 7   Set read position     not supported, for debugging
  239.              purposes.
  240.  
  241. 8   Start lores      Ends the command sequence and
  242.              starts lores graphics (use this
  243.              command for hires screens).
  244.  
  245. 24  Start hires      Ends the command sequence and
  246.              starts hires output (use this
  247.              command for SHires screens). This
  248.              command is only available with the
  249.              hires version, it's handeled like
  250.              the 8 command on the lores version.
  251.  
  252. First  command    to be executed is byte 0 in bitplane 0.  The
  253. corrosponding  parameter  is  located in bitplane 1, byte 0.
  254. The  second  command to be executet is byte 0 in bitplane 2,
  255. the  corrosponding  parameter  is byte 0 in bitplane 3.  The
  256. third  command    is  byte  1  in bitplane 0, the parameter is
  257. located in byte 1 of bitplane 1.  Example:
  258.  
  259. Assuming  the  base  addresses    of  the  four  bitplanes are
  260. located in (a0) to (a3):
  261.  
  262. move.b #5,(a0)+     ; set pixel read mask register
  263. move.b #255,(a1)+    ; to 255
  264. move.b #0,(a2)+     ; NOP
  265. move.b #0,(a3)+     ; parameter is ignored - can ne any
  266.             ; value.
  267.  
  268. The  pixel  read  mask register can be used for effects, see
  269. chapter 8 for suggestions.  This should be the first command
  270. in a palette sequence.
  271.  
  272. Addressing  with  postincrement  and  arranging in Blocks of
  273. four   sequential  move.b's  has  been  proved  to  be  very
  274. distinct.   The  following  sequence sets colour #0 to black
  275. (R=G=B=0):
  276.  
  277. move.b #4,(a0)+     ; set COLOUR #
  278. move.b #0,(a1)+     ; 0   next.
  279. move.b #6,(a2)+     ; Set red value
  280. move.b #0,(a3)+     ; to 0.
  281.  
  282. move.b #6,(a0)+     ; Set green value
  283. move.b #0,(a1)+     ; to 0.
  284. move.b #6,(a2)+     ; Set blue value
  285. move.b #0,(a3)+     ; to 0.
  286.  
  287. The next example sets color #23 to a light blue:
  288.  
  289. move.b #4,(a0)+     ; set COLOUR #
  290. move.b #23,(a1)+    ; 23  next.
  291. move.b #6,(a2)+     ; Set red value
  292. move.b #0,(a3)+     ; to 0.
  293.  
  294. move.b #6,(a0)+     ; Set green value
  295. move.b #0,(a1)+     ; to 0.
  296. move.b #6,(a2)+     ; Set blue value
  297. move.b #63,(a3)+    ; to 63.
  298.  
  299. You  don't  have  to  worry  if a command sequence crosses a
  300. scanline,  this  can  be handled by the Graffiti card.    This
  301. enables  the  programmer  to  set the palette using only the
  302. postincrement-moves.   To  reduce  the    number    of lines for
  303. transferring the palette, the complete overscan can be used.
  304.  
  305. The  last  command  in    the  palette sequence depends on the
  306. screenmode  you  want  to display, and on the version you're
  307. programming.   If  you are using the lores version, the last
  308. command is always 8:
  309.  
  310. move.b #8,(a0)+     ; Start lores Graphics
  311. move.b #0,(a1)+     ; This byte will be displayed as
  312.             ; graphics (Black in this case)
  313.  
  314. Using  the 8 command, graphics can be started within a line,
  315. which is not possible with the 24 command:
  316.  
  317. move.b #24,(a0)+    ; Start Hires Graphics
  318. move.b #0,(a1)+     ; This byte must be 0, otherwise
  319.             ; random colours will be displayed
  320.  
  321. The rest of the bytes in the line must be set to 0 if the 24
  322. command is not the last in a line.
  323.  
  324. 6. Using the chunky mode
  325.  
  326. Referring  to  the  Graphics  bitplanes  I  assume  that the
  327. bitplanepointers now point to new locations.
  328.  
  329. If  you  are  using  4 bitplanes, the graphics are displayed
  330. this way:
  331.  
  332. 1st pixel is byte 0 in bitplane 0
  333. 2nd pixel is byte 0 in bitplane 1
  334. 3rd pixel is byte 0 in bitplane 2
  335. 4th pixel is byte 0 in bitplane 3
  336. 5th pixel is byte 1 in bitplane 0
  337. 6th pixel is byte 1 in bitplane 1
  338. 7th pixel is byte 1 in bitplane 2
  339. 8th pixel is byte 1 in bitplane 3
  340. 9th pixel is byte 2 in bitplane 0
  341.  
  342. and so on.  The value of a byte represents the colour of the
  343. pixel.     As  you can see, the bitplanes are displayed in the
  344. sequence 0-1-2-3-0-1-2-3.
  345.  
  346. Using     2    bitplanes,    the   displaying   sequence   is
  347. 0-1-0-1-0-1..., in other words:
  348.  
  349. 1st pixel is byte 0 in bitplane 0
  350. 2nd pixel is byte 0 in bitplane 1
  351. 3rd pixel is byte 1 in bitplane 0
  352. 4th pixel is byte 1 in bitplane 1
  353. 5th pixel is byte 2 in bitplane 0
  354. 6th pixel is byte 2 in bitplane 1
  355. 7th pixel is byte 3 in bitplane 0
  356. 8th pixel is byte 3 in bitplane 1
  357. 9th pixel is byte 4 in bitplane 0
  358.  
  359. Using  a  single  bitplane,  the bytes are completely linear
  360. aligned, no further explanation necessary, is it?
  361.  
  362. 7. Speeding up
  363.  
  364. I'd  like  this chapter to be discussed, that's why I posted
  365. the  manual  to  alt.sys.amiga.demos.    I'm no programmer at
  366. all, all I can do is some move's, 6502 assembler and boolean
  367. equations, so don't take my suggestions too seriously.
  368.  
  369. The  aim  of  the design was to speed up games and animation
  370. players,  because  bitplaned  graphics take more CPU time to
  371. modify    than chunky graphics.  However, optimizing your code
  372. is  still necessary, because fast CPUs are still no standard
  373. in  the  Amiga world.  One main problem ist the bandwidth of
  374. the chipmem, which is discussed in chapter 3.
  375.  
  376. When  playing back animation sequences, triple buffering can
  377. speed  up, because you don't have to wait for the displaying
  378. hardware  to display your already-made second picture, which
  379. is  necessary  if  you    only  use  two buffers.  Using three
  380. buffers,  you can start drawing the second picture after the
  381. one  being  displayed,    so  your  CPU  is not idle.  If your
  382. routine  sometimes  takes  several frames to render a frame,
  383. and  sometimes    only  some  scanlines, more buffers could be
  384. useful, you have to find this out on your own.
  385.  
  386. If   you  are  using  more  than  one  bitplane,  horizontal
  387. rendering  takes  much    more  time  than vertical rendering,
  388. because  you have to spread the data over the bitplanes.  If
  389. you start four (or two, depending on the number of bitplanes
  390. you're  using)  vertical renderers, each of them can work in
  391. its own bitplane, so spreading the data is not necessary.
  392.  
  393. On OCS/ECS machines 4 bpls hires kills bandwidth on chipmem,
  394. so turn off the DMA where you can!
  395.  
  396. 8. Suggestions for effects
  397.  
  398. Hardware   sprites   can  be  used  as    objects,  but  their
  399. X-position   must   be    set  in  8-hires-pixel-steps  (lores
  400. diaplay) or 8-SHires-pixel-steps (hires display using SHires
  401. bitplanes).   As  you  can  see,  this    is  only possible on
  402. AGA-machines,  the  OCS/ECS only allows lores sprites, which
  403. is  useless  for  the  Graffiti.   Set    the  same  number of
  404. bitplanes  and    the  same  internal  colour  palette for the
  405. sprites.   The    Graffiti  GFX  card  cannot tear sprite data
  406. apart  from  bitplane data, so sprites use the same external
  407. colour    palette.   If you choose a 16-colour sprite to be 16
  408. pixel  wide,  the output will be 8 pixel wide.    You can also
  409. use  sprites  to increase resolution temporarily:  If you're
  410. using  2  hires-bitplanes  (160 pixel output), a 16- colours
  411. sprite will display in standard lores.
  412.   Problem: The sprite background (the bytes that are covered
  413. by the sprite) must be empty, i.e.  before you can display a
  414. sprite, you have to clear the area it will cover, so this is
  415. only useful for small moving objects without a background.
  416.  
  417. Fading in/out
  418. I  can    imagine that 18 bit colour fading looks pretty neat.
  419. Due  to the fact that the external palette is transferred as
  420. GFX  data,  you can use a single move into the copperlist to
  421. choose    another  colourtable.    If  you have pre- calculated
  422. fading tables, this won't take too much CPU time :-).
  423.  
  424. Hazy picture (Cmdr. La Forge, your visor is dead!)
  425. Swapping bitplanes causes pixels to be swapped.  If you swap
  426. bitplanes  0  and  2 of a 4-bitplane-display every 2nd line,
  427. the  picture  will  look hazy as if your glasses are smutty.
  428. Changing  the  bitplanes to be swapped every frame will look
  429. like  picture  noise.    You  can  underline  this  effect by
  430. switching  to a grey scale palette.  All this can be done by
  431. copper - hey, I could do that, too!
  432.  
  433. The  Pixel  read  mask    register  can  be used to reduce the
  434. maximum  #  of colours to be displayed.  This is achieved by
  435. gating    the  bytes in the bitplanes with the contents of the
  436. pixel  read  mask  register.   The  operation  is  a bitwise
  437. logical  ANDing.  The pixel masking operation can be used to
  438. alter the displayed colours without changing the contents of
  439. the  external  palette.   The effect of this operation is to
  440. partition  the    external  palette  into  a  number of colour
  441. planes.  This can be used for flashing objects, animation or
  442. overlays - without software overhead.
  443.  
  444. What  about  dot-landscapes?   Setting    a dot means a single
  445. move..
  446.  
  447. It's up to you!
  448.  
  449.  
  450. Appendix A: Dip switch settings and softscroll-offsets
  451.  
  452. To  be    compatible to every chipset there is, the programmer
  453. has do detect on which machine his program runs on.  You can
  454. find  the  version numbers of the chips in some variables of
  455. the  gfxbase.h (I'd be pleased if someone made a chapter out
  456. of this sentence!).
  457.  
  458. AGA machines:
  459. Dip 1 = on, Dip 2 = off,
  460. Softscroll = 0
  461.  
  462. OCS Machines (any Agnus with OCS Denise):
  463. Dip 1 = off, Dip 2 = off,
  464. Softscroll = 1 (1 lores-pixel to the right)
  465.  
  466. ECS Denise with 8372A Agnus:
  467. Dip 1 = on, Dip 2 = off,
  468. Softscroll = 1 (1 lores-pixel to the right)
  469.  
  470. ECS Denise with 8372B Agnus (A3000):
  471. Dip 1 = off, Dip 2 = off,
  472. Softscroll = 1 (1 lores-pixel to the right)
  473.  
  474. Other combinations have been succesfully tested, but I don't
  475. remember  the  Dip  settings  by now, they'll be in the next
  476. version of the manual.
  477.  
  478. ----- cut again (developer manual) -----
  479.